﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Tesla.Service.DataContracts;
using Tesla.Service.WcfServiceCommon;

namespace Tesla.Service.ServiceContracts
{
    [ServiceContract]
    public interface ISvcPhase
    {
        [OperationContract, FaultContract(typeof(WcfServiceFault)), ServiceKnownType("GetKnownTypes", typeof(Helper))]
        IList<BaseDC> DisplayAll(int gridSize, ref int? totalRecordCount);

        [OperationContract, FaultContract(typeof(WcfServiceFault)), ServiceKnownType("GetKnownTypes", typeof(Helper))]
        IList<BaseDC> SearchByName(string name, int gridSize, ref int? totalRecordCount);

        [OperationContract, FaultContract(typeof(WcfServiceFault)), ServiceKnownType("GetKnownTypes", typeof(Helper))]
        IList<BaseDC> Read(int id);

        [OperationContract, FaultContract(typeof(WcfServiceFault)), ServiceKnownType("GetKnownTypes", typeof(Helper))]
        IList<BaseDC> ReadByRange(int startRecordNo, int endRecordNo, string sortColName, string sortDirection, string searchString);

        [OperationContract, FaultContract(typeof(WcfServiceFault)), ServiceKnownType("GetKnownTypes", typeof(Helper))]
        int? Create(BaseDC bdc);

        [OperationContract, FaultContract(typeof(WcfServiceFault)), ServiceKnownType("GetKnownTypes", typeof(Helper))]
        int Update(BaseDC bdc);

        [OperationContract, FaultContract(typeof(WcfServiceFault)), ServiceKnownType("GetKnownTypes", typeof(Helper))]
        IList<BaseDC> ReadAllProjects();
    }



}
